package com.kanshu.ksgb.fastread.doudou.module.personal.presenter;

import com.kanshu.ksgb.fastread.doudou.module.personal.utils.RewardsStatus;
import com.kanshu.ksgb.fastread.doudou.module.personal.utils.VersionConfig;
import com.kanshu.ksgb.fastread.doudou.common.net.ResponseData;
import com.kanshu.ksgb.fastread.doudou.common.net.bean.BaseResult;
import com.kanshu.ksgb.fastread.doudou.common.net.bean.PageRequestParams;
import com.kanshu.ksgb.fastread.doudou.common.net.retrofit.FormObjConverterFactory;
import com.kanshu.ksgb.fastread.doudou.common.net.retrofit.Obj;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.AliAuthParams;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.ChargeBean;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.ConsumeBean;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.SSOLoginStatusBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.MakeMoneyConfig;
import com.kanshu.ksgb.fastread.doudou.module.personal.activity.BindPhoneActivity;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.BindInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.BindPhoneInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.BonusPool;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.CashRecordInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.CommentBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.ConfigBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.CustomerServiceInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.EncashRecordInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.EveryDayDialogInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.ExchangeResult;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.FeedbackBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.FrequentlyAskedQuestion;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.PayConfig;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.QuestionCategory;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.ReadFeedbackBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.RookieGift;
import com.kanshu.ksgb.fastread.doudou.common.business.commonbean.SignInData;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.SignInResult;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.UserBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.UserData;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.UserInfo;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.WithdrawResult;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by wcy on 2017\6\23 0023.
 */

public interface PersonCenterService {
    // 获取用户信息
    @GET("yd/user/one")
    Observable<BaseResult<UserBean>> getUserInfo(@Query("__flush_cache") String __flush_cache);

    // 反馈提交
    @FormUrlEncoded
    @POST("app/suggest/add")
    Observable<ResponseBody> submitFeedback(@FieldMap Map<String, String> maps);

    // 我的反馈
    @GET("app/suggest/lists")
    Observable<BaseResult<List<FeedbackBean>>> feedbackList();

    // 获取充值列表
    @GET("yd/pay/applists")
    Observable<BaseResult<List<ChargeBean>>> getChargeInfos(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj PageRequestParams params, @Query("__flush_cache") String __flush_cache);

    // 获取消费列表
    @GET("app/consume/lists")
    Observable<BaseResult<List<ConsumeBean>>> getConsumeInfos(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj PageRequestParams params, @Query("__flush_cache") String __flush_cache);

    // 获取我的评论列表
    @GET("yd/comment/lists")
    Observable<BaseResult<List<CommentBean>>> getCommentInfos(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj PageRequestParams params);

    // 根据设备号注册
    @FormUrlEncoded
    @POST("yd/user/app")
    Observable<BaseResult<UserBean>> registerByDeviceId(@FieldMap Map<String, String> map);

    @GET("yd/app/istestappversion")
    Observable<BaseResult<ConfigBean>> getConfig();

    @GET("app/user/baseinfo")
    Observable<BaseResult<UserData>> getUserBaseInfo(@QueryMap Map<String, String> maps);

    @GET("app/signin/info")
    Observable<BaseResult<SignInData>> getSignData();

    @FormUrlEncoded
    @POST("app/user/edit")
    Observable<BaseResult<String>> modifyUserBaseInfo(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/signin/addV1")
    Observable<BaseResult<SignInResult>> doSignIn(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/bonuspools/exchange")
    Observable<BaseResult<ExchangeResult>> exchangeBeans(@FieldMap Map<String, String> map);

    @GET("app/userdisciple/lists")
    Observable<BaseResult<List<UserBean>>> getPrenticesList(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj PageRequestParams params);

    @GET("app/bonuspools/one")
    Observable<BaseResult<BonusPool>> getBonuspools();

    @GET("app/extract/bindinfo")
    Observable<BaseResult<List<BindInfo>>> getAccountBindInfo();

    //绑定手机号
    @FormUrlEncoded
    @POST("app/user/bindphone")
    Observable<BaseResult<BindPhoneInfo>>   bindPhoneNum(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/phone/sendmsg/" + BindPhoneActivity.VALIDATION_EXPIRE_TIME)
    Observable<BaseResult<String>> getValidateCode(@FieldMap Map<String, String> map);


    //充值配置列表
    @GET("app/wechatpayconf/lists")
    Observable<BaseResult<List<PayConfig>>> getPayConfig();

    //充值配置列表
    @GET("yd/appfreepayconf/lists")
    Observable<BaseResult<List<PayConfig>>> getNoADPayConfig();


    //充值配置列表
    @GET("app/user/giftbag")
    Observable<BaseResult<RookieGift>> checkRookieGift();

    @POST("app/user/giftbag/receive")
    Observable<BaseResult<RookieGift>> getRookieGift();

    @GET("app/suggestreply/is_read")
    Observable<BaseResult<ReadFeedbackBean>> checkReadFeedback();

    @GET("app/extract/alipayauth")
    Observable<BaseResult<AliAuthParams>> getAliAuthParams();

    @FormUrlEncoded
    @POST("app/extract/apply")
    Observable<BaseResult<WithdrawResult>> withdrawApply(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/extract/check")
    Observable<BaseResult<String>> chechWithdraw(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/extract/alipayBindV1")
    Observable<BaseResult<String>> postAlipayAuthCode(@Field("app_auth_code") String app_auth_code);

    @GET("app/task/isopen")
    Observable<BaseResult<MakeMoneyConfig>> getMakeMoneyConfig();

    @GET("app/customerqq/customer")
    Call<ResponseData<CustomerServiceInfo>> getCustomerServiceQQ();

    @GET("app/questioncategory/lists")
    Observable<BaseResult<List<QuestionCategory>>> getQuestionCategory();

    @GET("app/question/lists")
//    Observable<BaseResult<List<FrequentlyAskedQuestion>>> getFrequentlyAskedQuestion(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj FrequentlyAskedQuestionRequestParams params);
    Observable<BaseResult<List<FrequentlyAskedQuestion>>> getFrequentlyAskedQuestion(@Query("category_id") String category_id);

    @FormUrlEncoded
    @POST("app/user/checkPhone")
    Observable<BaseResult<List<UserInfo>>> checkPhone(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/user/changePhone")
    Observable<BaseResult<List<UserInfo>>> changePhone(@FieldMap Map<String, String> map);

    @GET("app/usersso/login")
    Observable<BaseResult<SSOLoginStatusBean>> changeSSOLogin();

    // 启动性别弹窗
    @GET("app/appsexpop/one")
    Call<ResponseData<UserBean>> checkReadPreferences();

    // 修改用户性别
    @FormUrlEncoded
    @POST("app/user/modifysex")
    Observable<BaseResult<UserBean>> modifySex(@Field("sex") String sex);

    // 新用户自动注册and登录接口
    @GET("app/user/login_register")
    Observable<BaseResult<UserBean>> userLogin(@Query("phone") String phone, @Query("code") String code, @Query("invitation_code") String invitation_code);

    @GET("app/apppopup/popup?type_name=qidong_tanchuang")
    Call<ResponseData<EveryDayDialogInfo>> getEveryDayDialogInfo();

    @GET("app/extract/applists")
    Call<ResponseData<List<EncashRecordInfo>>> getEncashRecord();

    @GET("app/userrmb/lists")
    Call<ResponseData<List<CashRecordInfo>>> getCashRecord();

    @GET("app/userstart/add")
    Observable<BaseResult<String>> pVUVLaunchApp();

    @GET("yd/appdoudouversion/is_free_version")
    Observable<BaseResult<VersionConfig>> isFreeVersion();

    @GET("yd/appdoudougivecoin/getCoin")
    Observable<BaseResult<String>> getCoinReword();

    @GET("yd/appdoudougivecoin/isalreadygetcoin")
    Observable<BaseResult<RewardsStatus>> checkRewordStatus();
}

